package 牛客网_N.动态规划.魔术索引_2;

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		String str = in.nextLine();
		String[] dataStr = str.split(" ");
		int[] a = new int[n];
		for(int i = 0; i < n; i++){
			a[i] = Integer.parseInt(dataStr[i]);
		}
		if(a[0] != 0){
			System.out.println("false");
		}else{
			System.out.println("true");
		}
	}
}
